import request from '@/utils/request'

export function getBoolData(order_id) {
  return request({
    url: 'backend_get_bool_data',
    method: 'post',
    params:{order_id:order_id}
  })
}

export function getTongdunData(order_id) {
  return request({
    url: 'backend_get_tongdun_data',
    method: 'post',
    params:{order_id:order_id}
  })
}
// 获取订单
export function fetchAllListByDay(query) {
  return request({
    url: '/order/getBackendOrderListByDay',
    method: 'get',
    params: query
  })
}
// 获取订单
export function fetchAllListByMonth(query) {
  return request({
    url: '/order/getBackendOrderListByMonth',
    method: 'get',
    params: query
  })
}
export function fetchAllList(query) {
  return request({
    url: 'backend_order_list',
    method: 'get',
    params: query
  })
}
// 创建订单
export function createBackendOrder(data) {
  return request({
    url: 'backend_create_order',
    method: 'post',
    data
  })
}
// 导出订单
export function excelOrderLetter(data) {
  return request({
    url: 'excelOrderLetter',
    method: 'post',
    data
  })
}
// 恢复订单
export function recover(data) {
  return request({
    url: 'order_recover',
    method: 'post',
    data
  })
}
// 获取银行
export function yuanfeng_getBank(data) {
  return request({
    url: 'yuanfeng_getBank',
    method: 'post',
    data
  })
}
// 基础合同下载
export function downloadBase(data) {
  return request({
    url: 'downloadBase',
    method: 'post',
    data
  })
}
// 公证
export function notarApply(data) {
  return request({
    url: 'notarApply',
    method: 'post',
    data
  })
}
// 获取资方省市区
export function getInvestorRegion(data) {
  return request({
    url: 'backend_get_investor_region',
    method: 'post',
    data
  })
}
// 获取通融订单阶段流程
export function getTongrongOrderStage(data) {
  return request({
    url: 'tongrong_get_order_stage',
    method: 'post',
    data
  })
}
// 进件云贷
export function haierInparts(data) {
  return request({
    url: 'haier_income_parts',
    method: 'post',
    data
  })
}
// 云贷补件
export function haiercomplateFile(data) {
  return request({
    url: 'haier_file_complate',
    method: 'post',
    data
  })
}

export function acceptOrder(order_id) {
  return request({
    url: 'backend_order_accept',
    method: 'post',
    params:{order_id:order_id}
  })
}
// 获取商户和销售列表
export function fetchMarchantAndSale() {
  return request({
    url: 'backend_merchant_and_sale',
    method: 'get'
  })
}

// 获取初审订单
export function getBackendFirstOrder(query) {
  return request({
    url: '/order/getBackendFirstOrder',
    method: 'get',
    params: query
  })
}

// 获取信审订单
export function getBackendLetterOrder(query) {
  return request({
    url: '/order/getBackendLetterOrder',
    method: 'get',
    params: query
  })
}
// 获取合同订单
export function getBackendSignOrder(query) {
  return request({
    url: '/order/getBackendSignOrder',
    method: 'get',
    params: query
  })
}
// 获取术后订单
export function getBackendOperationOrder(query) {
  return request({
    url: '/order/getBackendOperationOrder',
    method: 'get',
    params: query
  })
}
// 获取退款订单
export function getBackendRefundOrder(query) {
  return request({
    url: '/order/getBackendRefundOrder',
    method: 'get',
    params: query
  })
}
// 获取订单记录
export function fetchOrderRecordListByOrderId(query) {
  return request({
    url: '/order/getOrderRecordListByOrderId',
    method: 'get',
    params: query
  })
}
// 订单详情，包括订单记录
export function fetchOrderDetail(order_id) {
  return request({
    url: 'backend_order_detail',
    method: 'post',
    params:{order_id:order_id}
  })
}

// 提交审核
export function submitCheckStatus(data) {
  return request({
    url: 'backend_order_exadmin',
    method: 'post',
    data
  })
}
// 修改海尔居间费还款期数
export function mediateTermSet(data) {
  return request({
    url: 'payment_subtraction_haier',
    method: 'post',
    data
  })
}
// 通融进件
export function tongRongIncomeParts(data) {
  return request({
    url: 'tongrong_incoming_parts',
    method: 'post',
    data
  })
}
// 修改订单基本信息
export function editOrderMainInfo(data) {
  return request({
    url: 'backend_order_edit_main',
    method: 'post',
    data
  })
}
// 修改订单合同信息
export function editOrderHt(data) {
  return request({
    url: 'backend_order_edit_ht',
    method: 'post',
    data
  })
}
// 修改订单信审资料信息
export function editOrderLetter(data) {
  return request({
    url: 'backend_order_edit_letter',
    method: 'post',
    data
  })
}
// 修改订单合同资料备注
export function updateOrderDesc(data) {
  return request({
    url: '/order/updateOrderDesc',
    method: 'post',
    data
  })
}
// 百融风控大数据
export function getBaiRongData(data) {
  return request({
    url: 'backend_get_bairong_data',
    method: 'post',
    data
  })
}
// 术后
export function operationSubmit(data) {
  return request({
    url: '/order/operationSubmit',
    method: 'post',
    data
  })
}
// 备注订单客户信息
export function descOrderMain(data) {
  return request({
    url: 'backend_order_desc',
    method: 'post',
    data
  })
}
// 退回信审
export function backLetter(data) {
  return request({
    url: 'backend_order_back_to_letter',
    method: 'post',
    data
  })
}
// 备注订单联系人信息
export function descOrderLetter(data) {
  return request({
    url: '/order/descOrderLetter',
    method: 'post',
    data
  })
}
// 获取通过点拒绝点
export function getOrderPoint(data) {
  return request({
    url: 'backend_get_order_point',
    method: 'post',
    data
  })
}
// 获取订单
export function getBackendSignOrderAll(data) {
  return request({
    url: 'backend_sign_order_all',
    method: 'get',
    data
  })
}
// 下载合同
export function downloadEsignContract(data) {
  return request({
    url: './esign_download_signed_contract',
    method: 'post',
    data
  })
}
// 发起签署
export function toSignServer(data) {
  return request({
    url: './toSignServer',
    method: 'post',
    data
  })
}
// 催签
export function CallingSignatures(data) {
  return request({
    url: './junziqian_tip_sign',
    method: 'post',
    data
  })
}
//获取签署链接
export function getSignUrl(data) {
  return request({
    url: 'esign_get_signurl',
    method: 'post',
    data
  })
}

